<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="https://cache.amap.com/lbs/static/main1119.css"/> 
    <!-- 引入地图的key值 -->
    <script type="text/javascript" src="https://webapi.amap.com/maps?v=2.0&key=ee0dc4f0fadec328270c38dd04dfec5e"></script>
    <!-- 引入JS -->
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
    <link rel="stylesheet" href="ditu.css">
    <style>
        @media only screen and (orientation: portrait) {
        body {
            background-color: rgb(11, 130, 241);
        }
    } 
    </style>
   
</head>
<body>
</body> 
<div id="container"></div>
        
</body>
<script> 
var map = new AMap.Map('container', {
        resizeEnable: true,
        center: [91.1185792 ,29.6554942],
        zoom: 13
    });

    var marker = new AMap.Marker({
        position: map.getCenter(),
        icon: 'http://a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png',
        anchor:'bottom-center',
        offset: new AMap.Pixel(0, 0)
    });
    marker.setMap(map);
    // 设置鼠标划过点标记显示的文字提示
    marker.setTitle('我是布达拉宫');
    // 设置label标签
    // label默认蓝框白底左上角显示，样式className为：amap-marker-label
    marker.setLabel({
        direction:'right',
        offset: new AMap.Pixel(10, 0),  //设置文本标注偏移量
        content: "<div class='info'>我是布达拉宫</div>", //设置文本标注内容
    })
</script>
</html>